<?php

defined('MOODLE_INTERNAL') or die("Direct access to this location is not allowed.");

define('LIBRESERVE_CAP_EDITREQUEST', 'block/moodlelibreserve:editrequest');
define('LIBRESERVE_CAP_ALLREQUESTS', 'block/moodlelibreserve:allrequests');

$block_moodlelibreserve_capabilities = array(

    'block/moodlelibreserve:makerequest' => array(

        'captype' => 'write',
        'contextlevel' => CONTEXT_BLOCK,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),

    'block/moodlelibreserve:editrequest' => array(

        'riskbitmask' => RISK_SPAM,

        'captype' => 'write',
        'contextlevel' => CONTEXT_BLOCK,
        'legacy' => array(
			'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),

    'block/moodlelibreserve:allrequests' => array(

        'captype' => 'write',
        'contextlevel' => CONTEXT_BLOCK,
        'legacy' => array(
            'admin' => CAP_ALLOW
        )
    ),
	
	'block/moodlelibreserve:edit_req' => array(

        'captype' => 'write',
        'contextlevel' => CONTEXT_USER,
        'legacy' => array(
            'librarian' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),

);

?>
